package com.cong.project.model.enums;

/**
 *  排行榜类型枚举类
 *
 * @author 聪
 */
public enum RankingEnum {
    /**
     * 排行榜类型枚举类
     */
    TALKING(1, "TALKING"),

    SHOP(0, "SHOP"),
    BUY(2, "BUY");


    private final int code;

    /**
     * 状态码信息
     */
    private final String message;



    RankingEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public static RankingEnum geEnumByValue(Integer code){
        if (code==null){
            return null;
        }
        RankingEnum[] values = RankingEnum.values();
        for (RankingEnum teamStatusEnum : values) {
            if (teamStatusEnum.getCode() ==code){
                return teamStatusEnum;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
